﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Ajxx.aspx.cs" Inherits="Xnjc_Tsgl_Ajxx" %>

<html>
<head runat="server">
    <title>案件列表显示</title>
    <link href="../css/page.css" rel="stylesheet" type="text/css" />
</head>

    <script type="text/javascript">

        function ResetValue() {
            document.all.jumpPage.value = 1;
        }

        function tosubmit() {
            var strUrl = "Ajxx.aspx?";
            strUrl += "UserNo=" + document.all.UserNo.value;
            strUrl += "&UserName=" + document.all.UserName.value;
            strUrl += "&PageNo=" + document.all.jumpPage.value

            window.location.href = strUrl;

        }
        function hrefonclic(strValue) {
            document.all.jumpPage.value = strValue;
            tosubmit();
        }

        function isSelected() {
            if (typeof (document.form1.radioArray) != "undefined") {
                if (document.form1.radioArray.checked == true) {
                    return true;
                }
                for (i = 0; i < document.form1.radioArray.length; i++) {
                    if (document.form1.radioArray[i].checked == true) {
                        return true;
                    }
                }
            }
            return false;
        }

        function doSelect() {
            if (isSelected()) {

                var key = "";
                if (typeof (document.form1.radioArray.length) == "undefined") {
                    key = document.form1.radioArray.value;
                }
                else {
                    for (i = 0; i < document.form1.radioArray.length; i++) {
                        if (document.form1.radioArray[i].checked == true) {
                            key = document.form1.radioArray[i].value;

                            break;
                        }
                    }
                }
                if (!window.opener.closed) {
                    window.opener.sectorSelect(key);
                    window.close();
                }
            }
        }

    </script>
<%

%>
<body>
    <form name="form1" method="post" action="Ajxx.aspx">
    <input type="hidden" name="radiobutton" value="">
    <input type="hidden" name="actionHidden" value="">
    <table width="100%" border="0" align="center">
        <tr>
            <td>
                <div class="box_top_bar">
                    <div class="box_top_left">
                        <div class="box_top_right">
                            <div class="box_top_text">
                                案件信息
                            </div>
                        </div>
                    </div>
                </div>
                <div class="box_middle">
                    <br>
                    <br>
                    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="tab">
                        <tr>
                            <td>
                                案件ID：
                            </td>
                            <td align="left">
                                <div align="left">
                                    <input name="UserNo" type="text" class="inputtext" size="10" value="<%=strUserNo%>">
                                </div>
                            </td>
                            <td>
                                案件名称:：
                            </td>
                            <td align="left">
                                <div align="left">
                                    <input name="UserName" type="text" class="inputtext" size="20" value="<%=strUserName%>">
                                    <input type="hidden" name="pageSize" value="<%=pagesize%>">
                                    <input type="hidden" name="PageNo" value="<%=pagenow%>">
                                </div>
                            </td>
                            <td width="23%" valign="middle" class="text">
                                <div align="center">
                                    <input name="end2" type="submit" class="top_button2" id="end24" value="查 询" onclick="ResetValue();">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="tab">
                                <tr>
                                    <td align="center">
                                        选择
                                    </td>
                                    <td align="center">
                                        <div align="center">
                                            案件ID</div>
                                    </td>
                                    <td align="center">
                                        <div align="center">
                                            案件名称</div>
                                    </td>
                                </tr>
                                <%
                              
                                    if (dtOut.Rows.Count == 0)
                                    {
                                %>
                                <tr bgcolor="#ffffff">
                                    <td align="middle" colspan="3" height="20">
                                        没有找到相关信息！
                                    </td>
                                </tr>
                                <%
                                    }
                                    else
                                    {
                                        foreach (System.Data.DataRow myArray in listwork)
                                        {
                                %>
                                <tr align="center" valign="middle" bgcolor="#FFFFFF" class="onmouseout" onmouseover="this.className='onmouseover';"
                                    onmouseout="this.className='onmouseout';">
                                    <td height="22">
                                        <input type="radio" name="radioArray" id="radioArray" value="<%=myArray[0]%>+<%=myArray[1]%>">
                                    </td>
                                    <td class="text">
                                        <%=myArray[0]%>
                                    </td>
                                    <td class="text">
                                        <%=myArray[1]%>
                                    </td>
                                </tr>
                                <%
                                    }
                                %>
                            </table>
                        </tr>
                        <tr bgcolor="#ffffff" align="right">
                            <table>
                                <td height="20" class="text">
                                    每页<%=pagesize%>行 共<%=mypagecout %>行 当前第<%=pagenow%>页 共<%=pagecount%>页
                                    <%
                                        if (pagenow == 1)
                                        {
                                            Response.Write(" 首页 上一页");
                                        }
                                        else
                                        {
			
                                    %>
                                    <a href="javascript:hrefonclic('1')">首页</a> <a href="javascript:hrefonclic('<%=pagenow - 1%>')">
                                        上一页</a>
                                    <%
                                        }
		
                                    %>
                                    <%
                                        if (pagenow == pagecount)
                                        {
                                            Response.Write("下一页 尾页");
                                        }
                                        else
                                        {
			
                                    %>
                                    <a href="javascript:hrefonclic('<%=pagenow + 1%>')">下一页</a> <a href="javascript:hrefonclic('<%=pagecount%>')">
                                        尾页</a>
                                    <%
                                        }
		
                                    %>
                                    转到第<select name="jumpPage" onchange="tosubmit('',this,'')">
                                        <%
                                            for (int i = 1; i <= pagecount; i++)
                                            {
                                                if (i == pagenow)
                                                {
                                        %>
                                        <option selected value="<%=i%>">
                                            <%=i%></option>
                                        <%
                                            }
                                                else
                                                {
				
                                        %>
                                        <option value="<%=i%>">
                                            <%=i%></option>
                                        <%
                                            }
                                            }
		
                                        %>
                                    </select>
                            页
                        </tr>
                        <%
                            }
	
                        %>
                        </TBODY>
                    </table>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="tab">
                    <tr align="center">
                        <div align="center">
                            <input type="button" class="top_button2" value="确定" onclick="doSelect()">&nbsp;&nbsp;
                            <input type="button" class="top_button2" value="关闭" onclick="window.close()">&nbsp;&nbsp;
                        </div>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>